Sensors comprise one or more measured variable transducers arranged in a housing. Often sensors must be arranged, positioned, aligned, or mounted in a defined position relative to a machine part or an object to be detected. This applies especially to position, alignment, or angle sensors that have a short measurement or detection field and must be mounted at a small distance to the objects to be detected. Examples here are inductive or capacitive proximity switches or magnetic sensors in which a magnetoresistive sensor element is installed in the housing. Such sensors can monitor, e.g., the rotational angle or rotational speed of shafts. For this purpose, a magnet wheel or a magnetic carrier with a magnetic ring is connected coaxially and rotationally fixed to the shaft. The housing is mounted at a small radial distance of, e.g., 0.4 mm to the magnetic ring on a machine part that is rigidly connected to the bearing of the shaft to be detected. Conventional aids such as distance plates or templates are used for specifying the distance between the housing and the magnet wheel for the assembly of the sensor. The mounting of such sensors is rather complicated and time-intensive, because several loose parts must be held or handled simultaneously, namely the sensor itself, the template, mounting means, such as, e.g., screws, and possibly a mounting tool, such as, e.g., a screwdriver. Under these conditions, the accuracy of the positioning can also suffer. The distance plates required for mounting such sensors are often supplied as accessories with the corresponding sensor. This can also affect the costs of such sensors, because more parts are to be managed. Aids for simple, precise, and economical positioning and/or alignment are advantageous not only for sensor housings, but also for other housings, such as, e.g., actuator housings. The term “actuator” comprises general transducer elements that transform an input variable into an output variable.